#include <iostream>
#include "linkqueue.h"
using namespace std;

Status print(ElemType num)
{
	cout << num << " ";
	return OK;
}


int main()
{
	LinkQueue lq;
	ElemType num;
	Status st;
	cout << "The queue is "<< ((lq.QueueEmpty())?"":"not ") << "empty." << endl;
	for(num = 1; num <= 5; num++)
	{
		cout << "Enqueue: " << num << endl;
		st = lq.EnQueue(num);
	}
	cout << "The queue is "<< ((lq.QueueEmpty())?"":"not ") << "empty." << endl;
	st = lq.GetHead(num);
	cout << "The element at the first is: " << num << endl;
	cout << "The length of the queue is: " << lq.QueueLength() << endl;
	cout << "Call the function \"print\" on the queue: ";
	lq.QueueTraverse(print);
	cout << endl;
	do{
		st = lq.DeQueue(num);
		if(st == OK)
			cout << "Dequeue: " << num << endl;
	}while(st == OK);
	return 0;
}